package com.ruoyi.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 对外接口访问日志对象 t_dm_graph_outapi_visit_log
 *
 * @author wjialong
 */
public class OutapiVisitLog extends BaseEntity {
    private static final long serialVersionUID = 1L;

    @Excel(name = "id")
    private String id;

    /**
     * 请求接口地址
     */
    @Excel(name = "请求接口地址")
    private String requestUrl;

    /**
     * 调用者id
     */
    @Excel(name = "调用者id")
    private String clientId;

    /**
     * 调用者ip
     */
    @Excel(name = "调用者ip")
    private String userIp;

    /**
     * 调用情况
     */
    @Excel(name = "调用情况")
    private Integer success;

    /**
     * 请求Id
     */
    @Excel(name = "请求Id")
    private String requestId;

    /**
     * 开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    /**
     * 结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /**
     * 执行时间
     */
    @Excel(name = "执行时间")
    private Long executeTime;

    public void setId(String id) {
        this.id = id;
    }

    public String getId() {
        return id;
    }

    public void setRequestUrl(String requestUrl) {
        this.requestUrl = requestUrl;
    }

    public String getRequestUrl() {
        return requestUrl;
    }

    public void setClientId(String clientId) {
        this.clientId = clientId;
    }

    public String getClientId() {
        return clientId;
    }

    public void setUserIp(String userIp) {
        this.userIp = userIp;
    }

    public String getUserIp() {
        return userIp;
    }

    public void setSuccess(Integer success) {
        this.success = success;
    }

    public Integer getSuccess() {
        return success;
    }

    public void setRequestId(String requestId) {
        this.requestId = requestId;
    }

    public String getRequestId() {
        return requestId;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setExecuteTime(Long executeTime) {
        this.executeTime = executeTime;
    }

    public Long getExecuteTime() {
        return executeTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("requestUrl", getRequestUrl())
                .append("clientId", getClientId())
                .append("userIp", getUserIp())
                .append("remark", getRemark())
                .append("createTime", getCreateTime())
                .append("createBy", getCreateBy())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("success", getSuccess())
                .append("requestId", getRequestId())
                .append("startTime", getStartTime())
                .append("endTime", getEndTime())
                .append("executeTime", getExecuteTime())
                .toString();
    }
}
